package com.chenfan.filestore.client;

import com.chenfan.ccp.common.result.R;
import com.chenfan.filestore.config.MultipartSupportConfig;
import com.chenfan.filestore.dto.TaskDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "chenfan-cloud-filestore",contextId = "user2",path = "/batch",configuration = MultipartSupportConfig.class,url = "${feign.batch:}")
public interface BatchClient {
    @ApiOperation("feign远程创建任务")
    @PostMapping(value = "/task/create", consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_VALUE)
    R<Long> createTask(@RequestBody TaskDTO taskDTO);
}
